package ch04;

class FlowEx21 {
	public static void main(String[] args) throws java.io.IOException {
		int input = 0;
		System.out.println("press x to quit. ");
		do {
			input = System.in.read();
			System.out.print((char) input);
		} while (input != -1 && input != 'x'); // Ctrl+z: -1
	}
}